load("@devinfra//bazel/api-golden:index_rjs.bzl", "api_golden_test_npm_package")

exports_files([
    "tsec-exemption.json",
])

api_golden_test_npm_package(
    name = "cdk_api",
    data = glob(["cdk/**"]) + [
        "//src/cdk:npm_package",
    ],
    golden_dir = "goldens/cdk",
    npm_package = "src/cdk/npm_package",
)

api_golden_test_npm_package(
    name = "material_api",
    data = glob(["material/**"]) + ["//src/material:npm_package"],
    golden_dir = "goldens/material",
    npm_package = "src/material/npm_package",
)

api_golden_test_npm_package(
    name = "google_maps_api",
    data = glob(["google-maps/**"]) + ["//src/google-maps:npm_package"],
    golden_dir = "goldens/google-maps",
    npm_package = "src/google-maps/npm_package",
    types = {
        "//:node_modules/@types/google.maps": "google.maps",
    },
)

api_golden_test_npm_package(
    name = "youtube_player_api",
    data = glob(["youtube-player/**"]) + ["//src/youtube-player:npm_package"],
    golden_dir = "goldens/youtube-player",
    npm_package = "src/youtube-player/npm_package",
    types = {
        "//:node_modules/@types/youtube": "youtube",
    },
)
